<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>Loader (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Loader (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":9,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.upstream</a></div>
<h2 title="Class Loader" class="title">Class Loader</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.upstream.Loader</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="LoaderErrorThrower.html" title="interface in com.google.android.exoplayer2.upstream">LoaderErrorThrower</a></code></dd>
</dl>
<hr>
<pre>public final class <span class="typeNameLabel">Loader</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
implements <a href="LoaderErrorThrower.html" title="interface in com.google.android.exoplayer2.upstream">LoaderErrorThrower</a></pre>
<div class="block">Manages the background loading of <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a>s.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Loader.Callback.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Callback</a>&lt;<a href="Loader.Callback.html" title="type parameter in Loader.Callback">T</a> extends <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Loadable</a>&gt;</span></code></th>
<td class="colLast">
<div class="block">A callback to be notified of <a href="Loader.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader</code></a> events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Loadable</a></span></code></th>
<td class="colLast">
<div class="block">An object that can be loaded using a <a href="Loader.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a></span></code></th>
<td class="colLast">
<div class="block">Action that can be taken in response to <a href="Loader.Callback.html#onLoadError(T,long,long,java.io.IOException,int)"><code>Loader.Callback.onLoadError(Loadable, long, long,
 IOException, int)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Loader.ReleaseCallback.html" title="interface in com.google.android.exoplayer2.upstream">Loader.ReleaseCallback</a></span></code></th>
<td class="colLast">
<div class="block">A callback to be notified when a <a href="Loader.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader</code></a> has finished being released.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="Loader.UnexpectedLoaderException.html" title="class in com.google.android.exoplayer2.upstream">Loader.UnexpectedLoaderException</a></span></code></th>
<td class="colLast">
<div class="block">Thrown when an unexpected exception or error is encountered during loading.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.upstream.LoaderErrorThrower">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.upstream.<a href="LoaderErrorThrower.html" title="interface in com.google.android.exoplayer2.upstream">LoaderErrorThrower</a></h3>
<code><a href="LoaderErrorThrower.Dummy.html" title="class in com.google.android.exoplayer2.upstream">LoaderErrorThrower.Dummy</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DONT_RETRY">DONT_RETRY</a></span></code></th>
<td class="colLast">
<div class="block">Discards the failed <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> and ignores any errors that have occurred.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DONT_RETRY_FATAL">DONT_RETRY_FATAL</a></span></code></th>
<td class="colLast">
<div class="block">Discards the failed <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RETRY">RETRY</a></span></code></th>
<td class="colLast">
<div class="block">Retries the load using the default delay.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RETRY_RESET_ERROR_COUNT">RETRY_RESET_ERROR_COUNT</a></span></code></th>
<td class="colLast">
<div class="block">Retries the load using the default delay and resets the error count.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String)">Loader</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;threadNameSuffix)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cancelLoading()">cancelLoading</a></span>()</code></th>
<td class="colLast">
<div class="block">Cancels the current load.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clearFatalError()">clearFatalError</a></span>()</code></th>
<td class="colLast">
<div class="block">Clears any stored fatal error.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createRetryAction(boolean,long)">createRetryAction</a></span>&#8203;(boolean&nbsp;resetErrorCount,
                 long&nbsp;retryDelayMillis)</code></th>
<td class="colLast">
<div class="block">Creates a <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader.LoadErrorAction</code></a> for retrying with the given parameters.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasFatalError()">hasFatalError</a></span>()</code></th>
<td class="colLast">
<div class="block">Whether the last call to <a href="#startLoading(T,com.google.android.exoplayer2.upstream.Loader.Callback,int)"><code>startLoading(T, com.google.android.exoplayer2.upstream.Loader.Callback&lt;T&gt;, int)</code></a> resulted in a fatal error.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLoading()">isLoading</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the loader is currently loading.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeThrowError()">maybeThrowError</a></span>()</code></th>
<td class="colLast">
<div class="block">Throws a fatal error, or a non-fatal error if loading is currently backed off and the current
 <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> has incurred a number of errors greater than the <a href="Loader.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader</code></a>s default
 minimum number of retries.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeThrowError(int)">maybeThrowError</a></span>&#8203;(int&nbsp;minRetryCount)</code></th>
<td class="colLast">
<div class="block">Throws a fatal error, or a non-fatal error if loading is currently backed off and the current
 <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> has incurred a number of errors greater than the specified minimum number
 of retries.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release()">release</a></span>()</code></th>
<td class="colLast">
<div class="block">Releases the loader.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#release(com.google.android.exoplayer2.upstream.Loader.ReleaseCallback)">release</a></span>&#8203;(<a href="Loader.ReleaseCallback.html" title="interface in com.google.android.exoplayer2.upstream">Loader.ReleaseCallback</a>&nbsp;callback)</code></th>
<td class="colLast">
<div class="block">Releases the loader.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Loadable</a>&gt;<br>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startLoading(T,com.google.android.exoplayer2.upstream.Loader.Callback,int)">startLoading</a></span>&#8203;(T&nbsp;loadable,
            <a href="Loader.Callback.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Callback</a>&lt;T&gt;&nbsp;callback,
            int&nbsp;defaultMinRetryCount)</code></th>
<td class="colLast">
<div class="block">Starts loading a <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="RETRY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RETRY</h4>
<pre>public static final&nbsp;<a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a> RETRY</pre>
<div class="block">Retries the load using the default delay.</div>
</li>
</ul>
<a id="RETRY_RESET_ERROR_COUNT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RETRY_RESET_ERROR_COUNT</h4>
<pre>public static final&nbsp;<a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a> RETRY_RESET_ERROR_COUNT</pre>
<div class="block">Retries the load using the default delay and resets the error count.</div>
</li>
</ul>
<a id="DONT_RETRY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DONT_RETRY</h4>
<pre>public static final&nbsp;<a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a> DONT_RETRY</pre>
<div class="block">Discards the failed <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> and ignores any errors that have occurred.</div>
</li>
</ul>
<a id="DONT_RETRY_FATAL">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DONT_RETRY_FATAL</h4>
<pre>public static final&nbsp;<a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a> DONT_RETRY_FATAL</pre>
<div class="block">Discards the failed <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a>. The next call to <a href="#maybeThrowError()"><code>maybeThrowError()</code></a> will throw
 the last load error.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Loader</h4>
<pre>public&nbsp;Loader&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;threadNameSuffix)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>threadNameSuffix</code> - A name suffix for the loader's thread. This should be the name of the
     component using the loader.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="createRetryAction(boolean,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRetryAction</h4>
<pre class="methodSignature">public static&nbsp;<a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream">Loader.LoadErrorAction</a>&nbsp;createRetryAction&#8203;(boolean&nbsp;resetErrorCount,
                                                       long&nbsp;retryDelayMillis)</pre>
<div class="block">Creates a <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader.LoadErrorAction</code></a> for retrying with the given parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>resetErrorCount</code> - Whether the previous error count should be set to zero.</dd>
<dd><code>retryDelayMillis</code> - The number of milliseconds to wait before retrying.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A <a href="Loader.LoadErrorAction.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader.LoadErrorAction</code></a> for retrying with the given parameters.</dd>
</dl>
</li>
</ul>
<a id="hasFatalError()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFatalError</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;hasFatalError()</pre>
<div class="block">Whether the last call to <a href="#startLoading(T,com.google.android.exoplayer2.upstream.Loader.Callback,int)"><code>startLoading(T, com.google.android.exoplayer2.upstream.Loader.Callback&lt;T&gt;, int)</code></a> resulted in a fatal error. Calling <a href="#maybeThrowError()"><code>maybeThrowError()</code></a> will throw the fatal error.</div>
</li>
</ul>
<a id="clearFatalError()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearFatalError</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;clearFatalError()</pre>
<div class="block">Clears any stored fatal error.</div>
</li>
</ul>
<a id="startLoading(com.google.android.exoplayer2.upstream.Loader.Loadable,com.google.android.exoplayer2.upstream.Loader.Callback,int)">
<!--   -->
</a><a id="startLoading(T,com.google.android.exoplayer2.upstream.Loader.Callback,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startLoading</h4>
<pre class="methodSignature">public&nbsp;&lt;T extends <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Loadable</a>&gt;&nbsp;long&nbsp;startLoading&#8203;(T&nbsp;loadable,
                                                     <a href="Loader.Callback.html" title="interface in com.google.android.exoplayer2.upstream">Loader.Callback</a>&lt;T&gt;&nbsp;callback,
                                                     int&nbsp;defaultMinRetryCount)</pre>
<div class="block">Starts loading a <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a>.

 <p>The calling thread must be a <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> thread, which is the thread on which the <a href="Loader.Callback.html" title="interface in com.google.android.exoplayer2.upstream" target="_top"><code>Loader.Callback</code></a> will be called.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the loadable.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>loadable</code> - The <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> to load.</dd>
<dd><code>callback</code> - A callback to be called when the load ends.</dd>
<dd><code>defaultMinRetryCount</code> - The minimum number of times the load must be retried before <a href="#maybeThrowError()"><code>maybeThrowError()</code></a> will propagate an error.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a> when the load started.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - If the calling thread does not have an associated <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a>.</dd>
</dl>
</li>
</ul>
<a id="isLoading()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLoading</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isLoading()</pre>
<div class="block">Returns whether the loader is currently loading.</div>
</li>
</ul>
<a id="cancelLoading()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cancelLoading</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;cancelLoading()</pre>
<div class="block">Cancels the current load.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If the loader is not currently loading.</dd>
</dl>
</li>
</ul>
<a id="release()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;release()</pre>
<div class="block">Releases the loader. This method should be called when the loader is no longer required.</div>
</li>
</ul>
<a id="release(com.google.android.exoplayer2.upstream.Loader.ReleaseCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;release&#8203;(@Nullable
                    <a href="Loader.ReleaseCallback.html" title="interface in com.google.android.exoplayer2.upstream">Loader.ReleaseCallback</a>&nbsp;callback)</pre>
<div class="block">Releases the loader. This method should be called when the loader is no longer required.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>callback</code> - An optional callback to be called on the loading thread once the loader has
     been released.</dd>
</dl>
</li>
</ul>
<a id="maybeThrowError()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeThrowError</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;maybeThrowError()
                     throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="LoaderErrorThrower.html#maybeThrowError()">LoaderErrorThrower</a></code></span></div>
<div class="block">Throws a fatal error, or a non-fatal error if loading is currently backed off and the current
 <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> has incurred a number of errors greater than the <a href="Loader.html" title="class in com.google.android.exoplayer2.upstream"><code>Loader</code></a>s default
 minimum number of retries. Else does nothing.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="LoaderErrorThrower.html#maybeThrowError()">maybeThrowError</a></code>&nbsp;in interface&nbsp;<code><a href="LoaderErrorThrower.html" title="interface in com.google.android.exoplayer2.upstream">LoaderErrorThrower</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - The error.</dd>
</dl>
</li>
</ul>
<a id="maybeThrowError(int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>maybeThrowError</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;maybeThrowError&#8203;(int&nbsp;minRetryCount)
                     throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="LoaderErrorThrower.html#maybeThrowError(int)">LoaderErrorThrower</a></code></span></div>
<div class="block">Throws a fatal error, or a non-fatal error if loading is currently backed off and the current
 <a href="Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> has incurred a number of errors greater than the specified minimum number
 of retries. Else does nothing.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="LoaderErrorThrower.html#maybeThrowError(int)">maybeThrowError</a></code>&nbsp;in interface&nbsp;<code><a href="LoaderErrorThrower.html" title="interface in com.google.android.exoplayer2.upstream">LoaderErrorThrower</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>minRetryCount</code> - A minimum retry count that must be exceeded for a non-fatal error to be
     thrown. Should be non-negative.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - The error.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
